<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改称号能力')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ability-edit" th:object="${fantasyTitleAbility}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">称号id：</label>
                <div class="col-sm-8">
                    <input name="titleId" th:field="*{titleId}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">能力名称：</label>
                <div class="col-sm-8">
                    <input name="abilityName" th:field="*{abilityName}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">能力描述：</label>
                <div class="col-sm-8">
                    <input name="describe" th:field="*{describe}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">能力类型：</label>
                <div class="col-sm-8">
                    <select name="type" class="form-control m-b" required>
                        <option value="主动">主动</option>
                        <option value="被动">被动</option>
                    </select>
                    <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 代码生成请选择字典属性</span>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">能力级别：</label>
                <div class="col-sm-8">
                    <input name="level" th:field="*{level}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">能力对应方法：</label>
                <div class="col-sm-8">
                    <input name="method" th:field="*{method}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">熟练度上限：</label>
                <div class="col-sm-8">
                    <input name="masteryLimit" th:field="*{masteryLimit}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">是否地图触发：</label>
                <div class="col-sm-8">
                    <input name="mapTrigger" th:field="*{mapTrigger}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">地图触发率(%)：</label>
                <div class="col-sm-8">
                    <input name="triggerRate" th:field="*{triggerRate}" class="form-control" type="text" required>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <script type="text/javascript">
        var prefix = ctx + "fantasy/fantasyTitleAbility";
        $("#form-ability-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-ability-edit').serialize());
            }
        }
    </script>
</body>
</html>